package com.neu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.neu.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

@Schema(description = "角色实体")
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("role")
public class Role extends BaseEntity {
    /**
     * 角色ID
     */
    @TableId(type= IdType.ASSIGN_ID)
    private String roleId;

    /**
     * 角色名称
     */
    private String roleName;
    /**
     * 该角色下的用户
     */
    @TableField(exist = false)
    private List<User> users;
    /**
     * 角色编码
     */
    private String roleCode;
    /**
     * 角色状态  0 禁用  1 正常
     */
    private String roleStatus;
    /**
     * 备注
     */
    private String remark;
}
